//
//  XDWithdrawProgressCell.m
//  xindailianmeng
//
//  Created by 张东 on 2017/2/15.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//

#import "XDWithdrawProgressCell.h"

@interface XDWithdrawProgressCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLb;
@property (weak, nonatomic) IBOutlet UILabel *detailsLb;
@property (weak, nonatomic) IBOutlet UIButton *tipBtn;

@end


@implementation XDWithdrawProgressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self = [[NSBundle mainBundle] loadNibNamed:@"XDWithdrawProgressCell" owner:self options:nil].firstObject;
    }
    return self;
}

- (void)withdrawProgressCellWithTitle:(NSString *)title details: (NSString *)details{
    
    self.titleLb.text = title;
    self.detailsLb.text = details;
    
    if ([self.detailsLb.text isEqualToString:@"交易失败"]) {
        self.tipBtn.hidden = NO;
    }else {
        self.tipBtn.hidden = YES;
    }
    
}


- (IBAction)tipBtnClick:(UIButton *)sender {
    
    if ([self.delegate respondsToSelector:@selector(withdrawProgressCellTipBtnClick:)]) {
        [self.delegate withdrawProgressCellTipBtnClick:self];
    }
    
}

@end
